<?php

namespace App\Params\Backend;

use App\Params\Param;
/**
 * 商品分类保存参数
 *
 * @author: WangBin
 * @date: 2021/7/26
 * @mail: <849850352@qq.com>
 */
class CategoryUpdateParam extends Param
{
    public $category_id = 0;
    public $category_bn = '';
    public $parent_id = 1;
    public $store_id = 0;
    public $name;
    public $icon_url = '';
    public $intro = '';
    public $remark = '';
    public $is_active = 1;
    public $path = 0;

    public function rules()
    {
        return [
            'name' => 'required|string',
            'category_id' => 'nullable|integer',
            'parent_id' => 'required|integer|min:1',
            'is_active' => 'boolean',
            'category_bn' => 'nullable|string',
            'icon_url' => 'nullable|string',
            'store_id' => 'nullable|integer',
            'remark' => 'nullable|string',
            'intro' => 'nullable|string',
        ];
    }

    /**
     * @return int
     */
    public function getCategoryId(): int
    {
        return $this->category_id;
    }

    /**
     * @param int $category_id
     */
    public function setCategoryId(int $category_id): void
    {
        $this->category_id = $category_id;
    }

    /**
     * @return string
     */
    public function getCategoryBn(): string
    {
        return $this->category_bn;
    }

    /**
     * @param string $category_bn
     */
    public function setCategoryBn(string $category_bn): void
    {
        $this->category_bn = $category_bn;
    }

    /**
     * @return int
     */
    public function getParentId(): int
    {
        return $this->parent_id;
    }

    /**
     * @param int $parent_id
     */
    public function setParentId(int $parent_id): void
    {
        $this->parent_id = $parent_id;
    }

    /**
     * @return int
     */
    public function getStoreId(): int
    {
        return $this->store_id;
    }

    /**
     * @param int $store_id
     */
    public function setStoreId(int $store_id): void
    {
        $this->store_id = $store_id;
    }

    /**
     * @return mixed
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param mixed $name
     */
    public function setName($name): void
    {
        $this->name = $name;
    }

    /**
     * @return string
     */
    public function getIconUrl(): string
    {
        return $this->icon_url;
    }

    /**
     * @param string $logo_url
     */
    public function setIconUrl(string $icon_url): void
    {
        $this->icon_url = $icon_url;
    }

    /**
     * @return string
     */
    public function getIntro(): string
    {
        return $this->intro;
    }

    /**
     * @param string $intro
     */
    public function setIntro(string $intro): void
    {
        $this->intro = $intro;
    }

    /**
     * @return string
     */
    public function getRemark(): string
    {
        return $this->remark;
    }

    /**
     * @param string $remark
     */
    public function setRemark(string $remark): void
    {
        $this->remark = $remark;
    }

    /**
     * @return int
     */
    public function getIsActive(): int
    {
        return $this->is_active;
    }

    /**
     * @param int $is_active
     */
    public function setIsActive(int $is_active): void
    {
        $this->is_active = $is_active;
    }
}
